package cc.cc4414.cc03.chat.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 消息发送表
 * </p>
 *
 * @author cc
 * @since 2019-01-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("chat_message_send")
public class MessageSend implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;

    /**
     * 消息id
     */
    private String messageId;

    /**
     * 消息发送时间
     */
    private LocalDateTime time;

    /**
     * 发送者id
     */
    private String senderId;

    /**
     * 发送者昵称。冗余字段
     */
    private String senderNickname;

    /**
     * 接收者id
     */
    private String receiverId;

    /**
     * 消息接收者类型：1为用户，2为群
     */
    private Integer receiverType;


    public static final String ID = "id";

    public static final String MESSAGE_ID = "message_id";

    public static final String TIME = "time";

    public static final String SENDER_ID = "sender_id";

    public static final String SENDER_NICKNAME = "sender_nickname";

    public static final String RECEIVER_ID = "receiver_id";

    public static final String RECEIVER_TYPE = "receiver_type";

}
